Skip to content

Synchronise template checks#441

Merged
MikeMcQuaid merged 1 commit into
mainfrom
sync-check-template-workflows
Jun 20, 2026
Merged

Synchronise template checks#441
MikeMcQuaid merged 1 commit into
mainfrom
sync-check-template-workflows

Conversation

@MikeMcQuaid

Copy link
Copy Markdown
Member
  • Share issue and pull request template checks across active public template repositories.
  • Sync check_template.rb with the workflows so each target repository validates templates from trusted base-branch code.
  • Remove stranded template-check files from unsupported target repositories during sync.
  • Limit syncing to Homebrew/brew, Homebrew/homebrew-core and Homebrew/homebrew-cask.

Copilot AI review requested due to automatic review settings June 19, 2026 19:50
Comment thread .github/workflows/check-prs.yml Dismissed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds and syncs automated issue/PR template validation across Homebrew’s active public template repositories, using API-fetched trusted code (rather than checked-out PR head code) to safely enforce template completeness.

Changes:

  • Introduces check-issues.yml and check-prs.yml workflows to comment/close and later reopen items once templates are complete.
  • Adds a shared Ruby check_template.rb validator used by both workflows.
  • Updates the sync action config to distribute (or remove) the template-check workflows/script only for Homebrew/brew, Homebrew/homebrew-core, and Homebrew/homebrew-cask.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/check-prs.yml New pull_request_target workflow to validate PR template completion and manage closing/reopening with comments.
.github/workflows/check-issues.yml New workflow to validate issue forms against templates from the three Homebrew repos and manage closing/reopening.
.github/scripts/check_template.rb Adds Ruby logic to detect whether PRs/issues preserved enough of the relevant template structure and (for PRs) retained AI disclosure.
.github/actions/sync/shared-config.rb Syncs the new workflows and checker script to supported repos and removes them from unsupported ones.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/check-prs.yml
Comment thread .github/workflows/check-prs.yml
Comment thread .github/scripts/check_template.rb Outdated
- Share issue and pull request template checks across active public
  template repositories.
- Sync `check_template.rb` with the workflows so each target repository
  validates templates from trusted base-branch code.
- Ignore template HTML comments when checking AI disclosure.
- Remove stranded template-check files from unsupported target
  repositories during sync.
- Limit syncing to `Homebrew/brew`, `Homebrew/homebrew-core` and
  `Homebrew/homebrew-cask`.
@MikeMcQuaid MikeMcQuaid force-pushed the sync-check-template-workflows branch from 8265d1a to 00b320f Compare June 19, 2026 20:02

@p-linnane p-linnane left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Always happy to see more automtation

@MikeMcQuaid MikeMcQuaid merged commit 27e5678 into main Jun 20, 2026
26 checks passed
@MikeMcQuaid MikeMcQuaid deleted the sync-check-template-workflows branch June 20, 2026 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants